package com.chixing.day08_interface;

public class InterfaceDemo {
    public static void main(String[] args) {
//        String s1 = "aile";
//        String s2 = "edit";
//        System.out.println(s1.compareTo(s2));

        Product product1 = new Product("杯子",900,5);
        Product product2 = new Product("手机",1000,999);
        int compare = product1.compare(product1, product2);
        System.out.println(compare);

        if(compare>0)
            System.out.println("前者销售更好");
        else if (compare<0)
            System.out.println("后者销量更好");
        else
            System.out.println("销量一样");

    }
}
